using DimensionsHelper.LanguageService.Syntax;

namespace DimensionsHelper.LanguageService;

public class AnalysisLocalConstant : AnalysisDeclaration
{
    internal AnalysisLocalConstant(ConstantDeclaration syntaxNode, AnalysisNode? parent) :
        base(AnalysisBoundKinds.LocalConstant, syntaxNode, parent)
    {
        Syntax = syntaxNode;
    }
    
    public override ConstantDeclaration Syntax { get; }
}


public static partial class AnalysisNodeFactory
{
    /// <summary>
    /// 创建一个本地常量定义
    /// </summary>
    /// <param name="syntaxNode">原始语法节点</param>
    /// <param name="parent">父节点，可以忽略</param>
    public static AnalysisLocalConstant LocalConstant(ConstantDeclaration syntaxNode, AnalysisNode? parent)
    {
        return new AnalysisLocalConstant(syntaxNode, parent);
    }
}